Technology has been disclosed that divides moving picture/audio data that is stream data to be digitally signed, generates a hash tree using the resulting data portions as leaves, and obtains the root hash value to digitally sign the stream data (for example, refer to Japanese Laid-Open Patent Publication No. 2008-178048). In this conventional technology, registers/memory capable of storing the data portions are assumed.
FIG. 11 is a diagram depicting a conventional hash tree generation method. The stream data is divided into multiple data portions. If Moving Picture Experts Group (MPEG)-1 stream data is to be divided into extractable data portions, division according to pixels or Group of Picture (GOP) units may be considered. GOP is the smallest unit of a moving picture (compilation of images), a unit by which independent playback is possible, and a structure for playing back and editing a moving picture partway through. Here, for simplicity, GOP units are assumed for the division into data portions.
At step (A) in FIG. 11, stream data is divided into input data f0 to f14 and each is substituted into a hash function H( ) and resulting hash values h0 to h14 are stored to registers/memory.
At step (B), adjacent hash values among the hash values h0 to h14 obtained at step (A) are concatenated. “hx|hy” (where, x and y are numbers) is a code string in which the tail of hash value hx and the head of hash value by are concatenated. Further, hx,y is the hash value obtained when the concatenated hash value is substituted into the hash function. At steps (C) to (E) as well, the operations are similarly repeated. At step (E), since a singular hash value results, the resulting hash value h0,14 is the root hash value.
Thus, in the conventional technology, to generate a hash tree according to steps (A) to (E), registers/memory of a large capacity to take in all of the stream data is necessary. Further, after all of the stream data is read in, it takes time for processing to generate a hash tree according to steps (A) to (E).
The technology disclosed herein addresses the realization of significant reductions in the register/memory capacity required and in the time consumed for post-processing, by enabling successive processing for tree generation in real-time.